package com.topisv.tms.repository;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.Consignor;

/**
 * 发货人信息DAO
 */
public interface ConsignorDao extends PagingAndSortingRepository<Consignor, Long>{

	@Query("select consignor from Consignor consignor where consignor.customers.id=?1")
	Consignor findCustomersId(Long customersId);
	
	@Query("select consignor from Consignor consignor where consignor.customers.customerCode=?1")
	Consignor findCustomerCode(String customerCode);
}
